package com.example.bankmanage.controller;

import com.example.bankmanage.dto.rep.FetchSystemLogsReqDTO;
import com.example.bankmanage.entity.PageBean;
import com.example.bankmanage.entity.system_logs;
import com.example.bankmanage.result.Result;
import com.example.bankmanage.service.SystemLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
@Slf4j
public class SystemLogController {
    @Autowired
    private SystemLogService systemLogService;
    @PostMapping("/system-logs")
    public Result<PageBean> fetchSystemLogs(@RequestBody FetchSystemLogsReqDTO requestParam){
        PageBean<system_logs> pageBean = systemLogService.fetchSystemLogs(requestParam);
        return Result.success(pageBean);
    }
}
